<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>双向数据绑定</title>
    <script src="./js/vue.js"></script>
</head>
<body>
<div id="app">
    <input type="text" v-model="name"> {{name}} {{age}} {{flag}}

    <hr/>
    {{[1,2,3,4,5][2]}}
    <hr/>
    <p>大括号中间一定记得留下一个空格</p>
    {{ {name:"小明",age:14} }}
    <hr/>
    {{ {name:"小刘", age:23}.name }}
    <hr/>
    {{ arr[1] }}
</div>
<script>
    new Vue({
        el: "#app",
        data: {
            name:"小高",
            age:13,
            flag:true,
            arr:["王哥","程格","杨哥"]
        },
        methods:{
            sayHi:function (){
                return "hello vue!";
            }
        }
    });
</script>
</body>
</html>